package com.example.jsonbugdemo;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class JsonBugDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(JsonBugDemoApplication.class, args);
    }

    @Bean
    CommandLineRunner clr(UserRestClient client){
        return args -> {
            //这里传参:jx-1|jx-2|jx-3|jx-4都会报错!!!
            //com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)
            //但是从jx-5开始就正常了!!!!
            UserCardResult uinfos = client.getUinfos("['jx-4']",false);
            System.out.println(uinfos);
        };
    }
}
